﻿<Page x:Class="Resn.WhuPub.WPFClientUI.DepartmentInfoPage"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
      xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
      Style="{StaticResource PageStyle}" Loaded="Page_Loaded">
        <Grid x:Name="LayoutRoot">
                <Grid.RowDefinitions>
                        <RowDefinition />
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="Auto" />
                        <RowDefinition />
                </Grid.RowDefinitions>
                <Grid Grid.Row="1" Margin="12">
                        <Border Grid.Column="0" Grid.Row="1" Style="{StaticResource BorderStyle}">
                                <Grid Margin="6">

                                        <Grid.RowDefinitions>
                                                <RowDefinition Height="Auto"/>
                                                <RowDefinition Height="Auto"/>
                                                <RowDefinition Height="Auto"/>
                                        </Grid.RowDefinitions>
                                        <Grid.ColumnDefinitions>
                                                <ColumnDefinition />
                                                <ColumnDefinition Width="Auto" MinWidth="60"/>
                                                <ColumnDefinition Width="Auto" MinWidth="280" />
                                        </Grid.ColumnDefinitions>

                                        <TextBlock Grid.Column="0" Grid.Row="0" Style="{DynamicResource BigTextBlockStyle}"
                                           HorizontalAlignment="Stretch" VerticalAlignment="Top"
                                           Text="{Binding Department.Name}" />

                                        <TextBlock Grid.Column="1" Grid.Row="1" 
                                           HorizontalAlignment="Right"
                                           Text="学校" />
                                        <TextBlock Grid.Column="2" Grid.Row="1" 
                                           HorizontalAlignment="Left"
                                           Text="{Binding Department.Branch.Corporate.Name}" />

                                        
                                        <TextBlock Grid.Column="1" Grid.Row="2" 
                                           HorizontalAlignment="Right"
                                           Text="校区" />
                                        <TextBlock Grid.Column="2" Grid.Row="2" 
                                           HorizontalAlignment="Left"
                                           Text="{Binding Department.Branch.Name}" />

                                </Grid>
                        </Border>
                </Grid>

                <Grid Grid.Row="2" Margin="12">
                        <Grid.ColumnDefinitions>
                                <ColumnDefinition />
                                <ColumnDefinition />
                                <ColumnDefinition />
                                <ColumnDefinition />
                        </Grid.ColumnDefinitions>
                        <Border Grid.Column="0" Style="{StaticResource BorderStyle}">
                                <Grid Margin="6">
                                        <Grid.RowDefinitions>
                                                <RowDefinition Height="Auto"/>
                                                <RowDefinition />
                                                <RowDefinition Height="Auto"/>
                                        </Grid.RowDefinitions>
                                        <Grid.ColumnDefinitions>
                                                <ColumnDefinition Width="Auto" />
                                                <ColumnDefinition />
                                                <ColumnDefinition Width="Auto" />
                                        </Grid.ColumnDefinitions>

                                        <TextBlock Grid.Column="0" Grid.ColumnSpan="3" Grid.Row="0" Style="{DynamicResource BigTextBlockStyle}"
                                           HorizontalAlignment="Stretch" VerticalAlignment="Top"
                                           Text="专业设置" />

                                        
                                        <TextBlock Grid.Column="0" Grid.Row="2" 
                                           HorizontalAlignment="Right"
                                           Text="共计" />
                                        <TextBlock Grid.Column="1" Grid.Row="2" 
                                           HorizontalAlignment="Left" 
                                           Text="{Binding Department.MajorSetups.Count}" />
                                        <Button Grid.Column="2" Grid.Row="2" Style="{DynamicResource ButtonStyle}"
                                           Content="进入" Click="MajorSetupButton_Click" />
                                </Grid>
                        </Border>

                        <Border Grid.Column="1" Style="{StaticResource BorderStyle}">
                                <Grid Margin="6">
                                        <Grid.RowDefinitions>
                                                <RowDefinition Height="Auto"/>
                                                <RowDefinition />
                                                <RowDefinition Height="Auto"/>
                                        </Grid.RowDefinitions>
                                        <Grid.ColumnDefinitions>
                                                <ColumnDefinition Width="Auto" />
                                                <ColumnDefinition />
                                                <ColumnDefinition Width="Auto" />
                                        </Grid.ColumnDefinitions>

                                        <TextBlock Grid.Column="0" Grid.ColumnSpan="3" Grid.Row="0" Style="{DynamicResource BigTextBlockStyle}"
                                           HorizontalAlignment="Stretch" VerticalAlignment="Top"
                                           Text="专业招生" />

                                        
                                        <TextBlock Grid.Column="0" Grid.Row="3" 
                                           HorizontalAlignment="Right"
                                           Text="共计" />
                                        <TextBlock Grid.Column="1" Grid.Row="3" 
                                           HorizontalAlignment="Left" 
                                           Text="{Binding Departmet.MajorOperations.Count}" />
                                        <Button Grid.Column="2" Grid.Row="3" Style="{DynamicResource ButtonStyle}"
                                           Content="进入" Click="MajorOperationButton_Click"/>
                                </Grid>
                        </Border>

                        <Border Grid.Column="2" Style="{StaticResource BorderStyle}">
                                <Grid Margin="6">
                                        <Grid.RowDefinitions>
                                                <RowDefinition Height="Auto"/>
                                                <RowDefinition />
                                                <RowDefinition Height="Auto"/>
                                        </Grid.RowDefinitions>
                                        <Grid.ColumnDefinitions>
                                                <ColumnDefinition Width="Auto" />
                                                <ColumnDefinition />
                                                <ColumnDefinition Width="Auto" />
                                        </Grid.ColumnDefinitions>

                                        <TextBlock Grid.Column="0" Grid.ColumnSpan="3" Grid.Row="0" Style="{DynamicResource BigTextBlockStyle}"
                                           HorizontalAlignment="Stretch" VerticalAlignment="Top"
                                           Text="课程" />

                                        
                                        <TextBlock Grid.Column="0" Grid.Row="3" 
                                           HorizontalAlignment="Right"
                                           Text="共计" />
                                        <TextBlock Grid.Column="1" Grid.Row="3" 
                                           HorizontalAlignment="Left" 
                                           Text="{Binding Department.Courses.Count}" />
                                        <Button Grid.Column="2" Grid.Row="3" Style="{DynamicResource ButtonStyle}"
                                           Content="进入" Click="CourseButton_Click"/>
                                </Grid>
                        </Border>

                        <Border Grid.Column="3" Style="{StaticResource BorderStyle}">
                                <Grid Margin="6">
                                        <Grid.RowDefinitions>
                                                <RowDefinition Height="Auto"/>
                                                <RowDefinition />
                                                <RowDefinition Height="Auto"/>
                                                <RowDefinition Height="Auto"/>
                                                <RowDefinition Height="Auto"/>
                                        </Grid.RowDefinitions>
                                        <Grid.ColumnDefinitions>
                                                <ColumnDefinition Width="Auto" />
                                                <ColumnDefinition />
                                                <ColumnDefinition Width="Auto" />
                                        </Grid.ColumnDefinitions>

                                        <TextBlock Grid.Column="0" Grid.ColumnSpan="3" Grid.Row="0" Style="{DynamicResource BigTextBlockStyle}"
                                           HorizontalAlignment="Stretch" VerticalAlignment="Top"
                                           Text="联系人" />

                                        
                                        <TextBlock Grid.Column="0" Grid.Row="3" 
                                           HorizontalAlignment="Right"
                                           Text="共计" />
                                        <TextBlock Grid.Column="1" Grid.Row="3" 
                                           HorizontalAlignment="Left" 
                                           Text="{Binding Department.Contacts.Count}" />
                                        <Button Grid.Column="2" Grid.Row="3" Style="{DynamicResource ButtonStyle}"
                                           Content="进入" Click="ContactButton_Click"/>
                                </Grid>
                        </Border>
                </Grid>
        </Grid>
</Page>